package yiface

import "net"

//IConnection : define connection interface
type IConnection interface {
	//start connection
	Start()

	//stop connection
	Stop()

	//get  socket conn from current connection
	GetTCPConnection() *net.TCPConn

	//get connection id
	GetConnID()

	//get  client's id and port
	GetRemoteAddr() net.Addr

	//send message to client
	Send(data []byte) error
}

//HandleFunc : define method for handling connection
type HandleFunc func(*net.TCPConn, []byte, int) error
